import time

from selenium import webdriver
from  selenium.webdriver.common.by import By
#获取浏览器驱动对象
driver = webdriver.Chrome()
driver.get("https://www.baidu.com")
driver.find_elements("id", "kw").send_keys("小米手机")
driver.find_elements("id  ", "su").click()

time.sleep(5)